
import static org.junit.Assert.assertTrue;

import org.junit.Test;


public class TestComplex {
	
	
@Test
public void testAdd() {
Complex c = new Complex(5,2);
c.add(new Complex(2,3));
assertTrue(c.equals(new Complex(7,5)));// Achtung
}

@Test
public void testSubtract() {
Complex c = new Complex(5,2);
c.subtract(new Complex(2,2));
assertTrue(c.equals(new Complex(3,0)));
}


@Test
public void testMultiply() {
Complex first = new Complex(5,2);
Complex second = new Complex(2, 1.4);
Complex result = first.multiply(second);
assertTrue(result.equals(new Complex(7.2,11.0)));
assertTrue(first.equals(new Complex(5,2)));
}
@Test
public void testDivide() {
Complex first = new Complex(5,2);
Complex second = new Complex(2, 1);
Complex result = first.divide(second);
assertTrue(result.equals(new Complex(2.4,-0.2)));
assertTrue(first.equals(new Complex(5,2)));

}



}